package day03;
/**逻辑运算符的演示*/
public class OperDemo3 {
    public static void main(String[] args) {
        //3）逻辑运算符：&&、||、！
        int a = 5,b = 10 , c = 5;
        /*
        boolean b1= b>=a && b<c;
        System.out.println(b1);  //true && false = false
        System.out.println(b<=c && b>a);  //false && true = false
        System.out.println(a==b && c>a);  //false && false = false
        System.out.println(b!=c && a<b);  //true && true = true
        int age = 40;
        System.out.println(age>=18&&age<=50);  //true && true = true

        System.out.println(b>=a || b<c);  //true || false = true
        System.out.println(b<=c || b>a);  //false || true = true
        System.out.println(b!=c || a<b);  //true || true = true
        System.out.println(a==b || b<c);  //false || false = false
        int score = 900;
        System.out.println(score<0 || score>100); //false || true = true

        System.out.println(!(a>b));  //!false = true
        System.out.println(!(a<c &&  c>a)); //!(false && false = false) = true
        System.out.println(!(a>b || b>c));  //!(false || true = true) = false
         */

        /*
        boolean b3 = a>b && c++>2;
        System.out.println(b3);  //false
        System.out.println(c);  // 5,发生短路了
        */

        boolean b3 = a<b || c++>2;
        System.out.println(b3); // true
        System.out.println(c);  //5,发生短路了

    }
}
